Class DHCPPacketImpl

All Implemented Interfaces:
IPCData, DHCPPacket, Pdu, Signal

public class DHCPPacketImpl extends PduImpl implements DHCPPacket
  • Field Details

    • messageOpCode

      protected Byte messageOpCode
    • messageType

      protected Byte messageType
    • hardwareAddressType

      protected Byte hardwareAddressType
    • hardwareAddressLength

      protected Byte hardwareAddressLength
    • hops

      protected Byte hops
    • transactionID

      protected String transactionID
    • timeInSeconds

      protected Short timeInSeconds
    • flags

      protected Short flags
    • clientIpAddress

      protected IPAddress clientIpAddress
    • yourIpAddress

      protected IPAddress yourIpAddress
    • serverIpAddress

      protected IPAddress serverIpAddress
    • relayAgentIpAddress

      protected IPAddress relayAgentIpAddress
    • gatewayIpAddress

      protected IPAddress gatewayIpAddress
    • clientMacAddress

      protected MACAddress clientMacAddress
    • serverName

      protected String serverName
    • domainName

      protected String domainName
    • bootFileName

      protected String bootFileName
    • listOptions

      protected List<DHCPOption> listOptions
    • leaseTime

      protected int leaseTime
    • rebindTime

      protected int rebindTime
    • renewTime

      protected int renewTime
    • gatewaySubnetAddress

      protected IPAddress gatewaySubnetAddress
    • tftpAddress

      protected IPAddress tftpAddress
    • requestIp

      protected IPAddress requestIp
    • rawOptions

      protected List<Byte> rawOptions
    • wlcAddress

      protected IPAddress wlcAddress
  • Constructor Details

    • DHCPPacketImpl

      public DHCPPacketImpl()
  • Method Details

    • getMessageOpCode

      public Byte getMessageOpCode()
      Specified by:
      getMessageOpCode in interface DHCPPacket
      Returns:
      Byte Returns a Byte
    • setMessageOpCode

      public void setMessageOpCode(Byte messageOpCode)
      Specified by:
      setMessageOpCode in interface DHCPPacket
      Parameters:
      messageOpCode - Takes in a parameter of messageOpCode
    • getMessageType

      public Byte getMessageType()
      Specified by:
      getMessageType in interface DHCPPacket
      Returns:
      Byte Returns a Byte
    • setMessageType

      public void setMessageType(Byte messageType)
      Specified by:
      setMessageType in interface DHCPPacket
      Parameters:
      messageType - Takes in a parameter of messageType
    • getHardwareAddressType

      public Byte getHardwareAddressType()
      Specified by:
      getHardwareAddressType in interface DHCPPacket
      Returns:
      Byte Returns a Byte
    • setHardwareAddressType

      public void setHardwareAddressType(Byte hardwareAddressType)
      Specified by:
      setHardwareAddressType in interface DHCPPacket
      Parameters:
      hardwareAddressType - Takes in a parameter of hardwareAddressType
    • getHardwareAddressLength

      public Byte getHardwareAddressLength()
      Specified by:
      getHardwareAddressLength in interface DHCPPacket
      Returns:
      Byte Returns a Byte
    • setHardwareAddressLength

      public void setHardwareAddressLength(Byte hardwareAddressLength)
      Specified by:
      setHardwareAddressLength in interface DHCPPacket
      Parameters:
      hardwareAddressLength - Takes in a parameter of hardwareAddressLength
    • getHops

      public Byte getHops()
      Specified by:
      getHops in interface DHCPPacket
      Returns:
      Byte Returns a Byte
    • setHops

      public void setHops(Byte hops)
      Specified by:
      setHops in interface DHCPPacket
      Parameters:
      hops - Takes in a parameter of hops
    • getTransactionID

      public String getTransactionID()
      Specified by:
      getTransactionID in interface DHCPPacket
      Returns:
      String Returns a String
    • setTransactionID

      public void setTransactionID(String transactionID)
      Specified by:
      setTransactionID in interface DHCPPacket
      Parameters:
      transactionID - Takes in a parameter of transactionID
    • getTimeInSeconds

      public Short getTimeInSeconds()
      Specified by:
      getTimeInSeconds in interface DHCPPacket
      Returns:
      Short Returns a Short
    • setTimeInSeconds

      public void setTimeInSeconds(Short timeInSeconds)
      Specified by:
      setTimeInSeconds in interface DHCPPacket
      Parameters:
      timeInSeconds - Takes in a parameter of timeInSeconds
    • getFlags

      public Short getFlags()
      Specified by:
      getFlags in interface DHCPPacket
      Returns:
      Short Returns a Short
    • setFlags

      public void setFlags(Short flags)
      Specified by:
      setFlags in interface DHCPPacket
      Parameters:
      flags - Takes in a parameter of flags
    • getClientIpAddress

      public IPAddress getClientIpAddress()
      Specified by:
      getClientIpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setClientIpAddress

      public void setClientIpAddress(IPAddress clientIpAddress)
      Specified by:
      setClientIpAddress in interface DHCPPacket
      Parameters:
      clientIpAddress - Takes in a parameter of clientIpAddress
    • getYourIpAddress

      public IPAddress getYourIpAddress()
      Specified by:
      getYourIpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setYourIpAddress

      public void setYourIpAddress(IPAddress yourIpAddress)
      Specified by:
      setYourIpAddress in interface DHCPPacket
      Parameters:
      yourIpAddress - Takes in a parameter of yourIpAddress
    • getServerIpAddress

      public IPAddress getServerIpAddress()
      Specified by:
      getServerIpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setServerIpAddress

      public void setServerIpAddress(IPAddress serverIpAddress)
      Specified by:
      setServerIpAddress in interface DHCPPacket
      Parameters:
      serverIpAddress - Takes in a parameter of serverIpAddress
    • getRelayAgentIpAddress

      public IPAddress getRelayAgentIpAddress()
      Specified by:
      getRelayAgentIpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setRelayAgentIpAddress

      public void setRelayAgentIpAddress(IPAddress relayAgentIpAddress)
      Specified by:
      setRelayAgentIpAddress in interface DHCPPacket
      Parameters:
      relayAgentIpAddress - Takes in a parameter of relayAgentIpAddress
    • getGatewayIpAddress

      public IPAddress getGatewayIpAddress()
      Specified by:
      getGatewayIpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setGatewayIpAddress

      public void setGatewayIpAddress(IPAddress gatewayIpAddress)
      Specified by:
      setGatewayIpAddress in interface DHCPPacket
      Parameters:
      gatewayIpAddress - Takes in a parameter of gatewayIpAddress
    • getClientMacAddress

      public MACAddress getClientMacAddress()
      Specified by:
      getClientMacAddress in interface DHCPPacket
      Returns:
      MACAddress Returns a MACAddress
    • setClientMacAddress

      public void setClientMacAddress(MACAddress clientMacAddress)
      Specified by:
      setClientMacAddress in interface DHCPPacket
      Parameters:
      clientMacAddress - Takes in a parameter of clientMacAddress
    • getServerName

      public String getServerName()
      Specified by:
      getServerName in interface DHCPPacket
      Returns:
      String Returns a String
    • setServerName

      public void setServerName(String serverName)
      Specified by:
      setServerName in interface DHCPPacket
      Parameters:
      serverName - Takes in a parameter of serverName
    • getDomainName

      public String getDomainName()
      Specified by:
      getDomainName in interface DHCPPacket
      Returns:
      String Returns a String
    • setDomainName

      public void setDomainName(String domainName)
      Specified by:
      setDomainName in interface DHCPPacket
      Parameters:
      domainName - Takes in a parameter of domainName
    • getBootFileName

      public String getBootFileName()
      Specified by:
      getBootFileName in interface DHCPPacket
      Returns:
      String Returns a String
    • setBootFileName

      public void setBootFileName(String bootFileName)
      Specified by:
      setBootFileName in interface DHCPPacket
      Parameters:
      bootFileName - Takes in a parameter of bootFileName
    • getListOptions

      public List<DHCPOption> getListOptions()
      Specified by:
      getListOptions in interface DHCPPacket
      Returns:
      List<DHCPOption> Returns a List<DHCPOption>
    • setListOptions

      public void setListOptions(List<DHCPOption> listOptions)
      Specified by:
      setListOptions in interface DHCPPacket
      Parameters:
      listOptions - Takes in a parameter of listOptions
    • getLeaseTime

      public int getLeaseTime()
      Specified by:
      getLeaseTime in interface DHCPPacket
      Returns:
      int Returns a int
    • setLeaseTime

      public void setLeaseTime(int leaseTime)
      Specified by:
      setLeaseTime in interface DHCPPacket
      Parameters:
      leaseTime - Takes in a parameter of leaseTime
    • getRebindTime

      public int getRebindTime()
      Specified by:
      getRebindTime in interface DHCPPacket
      Returns:
      int Returns a int
    • setRebindTime

      public void setRebindTime(int rebindTime)
      Specified by:
      setRebindTime in interface DHCPPacket
      Parameters:
      rebindTime - Takes in a parameter of rebindTime
    • getRenewTime

      public int getRenewTime()
      Specified by:
      getRenewTime in interface DHCPPacket
      Returns:
      int Returns a int
    • setRenewTime

      public void setRenewTime(int renewTime)
      Specified by:
      setRenewTime in interface DHCPPacket
      Parameters:
      renewTime - Takes in a parameter of renewTime
    • getGatewaySubnetAddress

      public IPAddress getGatewaySubnetAddress()
      Specified by:
      getGatewaySubnetAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setGatewaySubnetAddress

      public void setGatewaySubnetAddress(IPAddress gatewaySubnetAddress)
      Specified by:
      setGatewaySubnetAddress in interface DHCPPacket
      Parameters:
      gatewaySubnetAddress - Takes in a parameter of gatewaySubnetAddress
    • getTftpAddress

      public IPAddress getTftpAddress()
      Specified by:
      getTftpAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setTftpAddress

      public void setTftpAddress(IPAddress tftpAddress)
      Specified by:
      setTftpAddress in interface DHCPPacket
      Parameters:
      tftpAddress - Takes in a parameter of tftpAddress
    • getRequestIp

      public IPAddress getRequestIp()
      Specified by:
      getRequestIp in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setRequestIp

      public void setRequestIp(IPAddress requestIp)
      Specified by:
      setRequestIp in interface DHCPPacket
      Parameters:
      requestIp - Takes in a parameter of requestIp
    • getRawOptions

      public List<Byte> getRawOptions()
      Specified by:
      getRawOptions in interface DHCPPacket
      Returns:
      List<Byte> Returns a List<Byte>
    • setRawOptions

      public void setRawOptions(List<Byte> rawOptions)
      Specified by:
      setRawOptions in interface DHCPPacket
      Parameters:
      rawOptions - Takes in a parameter of rawOptions
    • getWlcAddress

      public IPAddress getWlcAddress()
      Specified by:
      getWlcAddress in interface DHCPPacket
      Returns:
      IPAddress Returns a IPAddress
    • setWlcAddress

      public void setWlcAddress(IPAddress wlcAddress)
      Specified by:
      setWlcAddress in interface DHCPPacket
      Parameters:
      wlcAddress - Takes in a parameter of wlcAddress
    • getFieldType

      public PtmpTypeValue getFieldType(String fieldName)
      Overrides:
      getFieldType in class PduImpl
    • read

      public void read(EncodedBuffer buffer)
      Reads this object from an EncodedBuffer of raw data
      Specified by:
      read in interface IPCData
      Overrides:
      read in class PduImpl
      Parameters:
      buffer - The EncodedBuffer that contains the raw data from which to construct this object
    • pduRead

      public void pduRead(EncodedBuffer buffer)
      Specified by:
      pduRead in interface Signal
      Overrides:
      pduRead in class PduImpl
    • getOrderedFieldNames

      public List<String> getOrderedFieldNames()
      Specified by:
      getOrderedFieldNames in interface Signal
      Overrides:
      getOrderedFieldNames in class PduImpl
    • encodeTypeAndPayload

      public void encodeTypeAndPayload(EncodedBuffer buffer)
      Specified by:
      encodeTypeAndPayload in interface Signal
      Overrides:
      encodeTypeAndPayload in class PduImpl